<%--
  Created by IntelliJ IDEA.
  User: 86135
  Date: 2023/3/26
  Time: 14:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title></title>
</head>
<body>
<%
    Object object = session.getAttribute("validated");
    Object repeat = session.getAttribute("borrowMsg");
    if (object != null){
        if (repeat!=null & repeat.toString().equals("已借阅")){
%>
<script language="JavaScript">window.alert("正在借阅此书，无法重复借阅！")</script>
<script language="JavaScript">history.back()</script>
<%
} else if (repeat!=null & repeat.toString().equals("借阅已达上限")) {
%>
<script language="JavaScript">window.alert("借阅已达上限！")</script>
<script language="JavaScript">history.back()</script>
<%
} else if (repeat!=null & repeat.toString().equals("本书已无库存")) {
%>
<script language="JavaScript">window.alert("本书库存为0，请等待进货哦！")</script>
<script language="JavaScript">history.back()</script>
<%
    } else {
%>
<script language="JavaScript">window.alert("信用不足，请升级信用！")</script>
<script language="JavaScript">history.back()</script>
<%
    }}else{
%>
<script language="JavaScript">window.alert("请先登录！")</script>
<script language="JavaScript">history.back()</script>
<%
    }
%>
</body>
</html>
